package day0721;

import java.util.ArrayList;
import java.util.List;

public class Test8 {
    public static void main(String[] args) {
        ArrayList<Student>  list=new ArrayList<>();
        list.add(new Student("张三",1.71));
        list.add(new Student("李四",1.72));
        list.add(new Student("王五",1.73));
        list.add(new Student("赵六",1.74));

        List<Student> subList=list.subList(1,3);
        Student  s1=subList.get(0);
        s1.setHeight(1.8);

        System.out.println(list);
        System.out.println(subList);
    }
}
